package com.example.redistest.ThreadDemo;

public class Processor6 implements  Runnable {
    private Bank bank;
    public Processor6 (Bank bank){
        this.bank = bank;
    }
    @Override
    public void run() {
        while (true){
            //执行取款操作
            bank.takeMoney(1000.0);
            System.out.println(Thread.currentThread().getName()+":::"+bank.getName()+"取款1000.0成功,余额: "+bank.getBlanance());
        }
    }
}
